/*
 * Frase.cpp
 *
 *  Created on: Oct 9, 2012
 *      Author: romina
 */

#include "Frase.h"



Frase::Frase(string frase){

	if (frase.empty()){
		throw NotNullException("No se puede crear una frase vacia.");
	}
	this->frase = frase;

}

int Frase::getTamanio(){
	return this->frase.length();
}

string Frase::toString(){
	return this->frase;
}

void Frase::serializar(char * buffer, unsigned int &offset){

	PersistorHASH::transformar_cadena_en_char(buffer, offset, (char*)this->frase.c_str());
}

void Frase::deserializar(char * buffer, unsigned int &offset){

	this->frase = PersistorHASH::obtener_cadena_desde_Buffer(buffer, offset);
}

Frase::~Frase() {
	// TODO Auto-generated destructor stub
}

